//
//  EwmVc.swift
//  GjCup
//
//  Created by abc on 2024/4/9.
//

import UIKit

class EwmVc: UIViewController {
    
    @IBOutlet weak var inputTv: UITextView!{
        didSet{
            inputTv.layer.cornerRadius = 10
        }
    }
    
    @IBOutlet weak var bBtn: UIButton!{
        didSet{
            bBtn.layer.cornerRadius = 6
        }
    }
    
    var content = ""
    
    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
    }
    
    @IBAction func beginAc(_ sender: UIButton) {
        let text = inputTv.text ?? ""
        if text.isEmpty {
            UIAlertController.ok_alert("请输入内容", self)
            return
        }
        
        content = text
        
        performSegue(withIdentifier: "EwmToImg", sender: self)
    }
    
    
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
        if segue.identifier == "EwmToImg" {
            let vc = segue.destination as! EwmImgVc
            vc.content = content

        }
        
    }
    

}
